package com.flaskpy.web.eternity.auth.jwt.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.security.crypto.password.PasswordEncoder;

@Slf4j
public class DefaultPasswordEncoderImpl implements PasswordEncoder, InitializingBean {
    @Override
    public String encode(CharSequence rawPassword) {
        return rawPassword.toString();
    }

    @Override
    public boolean matches(CharSequence rawPassword, String encodedPassword) {
        return rawPassword.equals(encodedPassword);
    }

    @Override
    public void afterPropertiesSet() throws Exception {
      log.warn("请你输入设置PasswordEncoder");
    }
}
